<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Car Rent Inc</title>
</h:head>

<ui:composition template="/templates/frame.xhtml">
	<ui:param name="activeIndex" value="1" />
	<ui:define name="page">
		<h:form id="new_request_form">
			<h:message for="beginDate"></h:message>
			<h:panelGrid columns="2">
				<h:outputLabel value="Start date: " />
				<rich:calendar id="beginDate"
					value="#{createRequestBean.request.beginDate}" locale="en/US"
					popup="true" datePattern="d/M/yy HH:mm" showApplyButton="false"
					cellWidth="24px" cellHeight="22px" style="width:200px"
					required="true" />
				<h:outputLabel value="End date: " />
				<rich:calendar value="#{createRequestBean.request.endDate}"
					locale="en/US" popup="true" datePattern="d/M/yy HH:mm"
					showApplyButton="false" cellWidth="24px" cellHeight="22px"
					style="width:200px" required="true" />
				<h:outputLabel value="Car: " />
				<rich:select enableManualInput="true"
					defaultLabel="start typing for select"
					value="#{createRequestBean.request.car}"
					converter="#{carConverter}">
					<f:selectItems value="#{createRequestBean.cars}" />
				</rich:select>
			</h:panelGrid>
			<h:commandButton value="Submit"
				action="#{createRequestBean.createRequest}" />
		</h:form>
	</ui:define>
</ui:composition>
</html>